<!--
 * @Date: 2025-01-08 13:50:14
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2025-01-08 13:50:16
 * @Description: 项目变更历史表格
-->
<template>
  <rk-grid
    ref="rkGridRef"
    dataUrl="/proModifyPerfect/modifyHistory"
    :params="queryParams"
    :columns="tableColumns"
    :boxConfig="false"
    :toolbarConfig="false"
    :totaled="true"
    :pagerConfig="false">
  </rk-grid>
</template>

<script setup name="ChangeHistoryTable">
import {PROJ_MODITY_TYPE_ENUMS} from '@/enums/enums-project.js';

import { reactive, ref } from "vue";

const props = defineProps({
  // 表单数据信息
  formData: { type: Object, default: () => ({}) }
});

// ----- 表格相关操作
// 表格的模板引用
const rkGridRef = ref();
// 表格的查询参数
const queryParams = ref({
  proId: props.formData.proId
});

const tableColumns = [
  {
    field: 'modifyType', title: '变更类型', align: 'center',
    formatter: ({ row, column }) => {
      return row.modifyType ? PROJ_MODITY_TYPE_ENUMS.options[row.modifyType].label : "";
    }
  },
  { field: 'modifyDate', title: '变更日期', align: 'center' },
  { field: 'modifyUser', title: '变更人', align: 'left' },
  { field: 'modifyImport', title: '变更要点', align: 'left' },
  { field: 'modifyReason', title: '变更原因', align: 'left' },
  { field: 'modifyStatus', title: '变更状态', align: 'center' },
]

</script>

<style scoped lang="scss">
.mrtb-30px {
	margin-top: 30px;
	margin-bottom: 30px;
}
</style>